#ifndef IUICONTROL_H_
#define IUICONTROL_H_

#include <e32std.h>
#include <gdi.h>
#include "UIStyle.h"

class IUIControl
	{
public:
	virtual ~IUIControl(){};
	//����
	virtual void Layout(TRect rc) = 0;
	virtual void Draw(CGraphicsContext& aGc) = 0;
	virtual TRect EstimateSize(const UISize& aSize) = 0;
//	virtual TSize GetMinimumSize() = 0;
	
	//����
	virtual void SetPropertyL(const TDesC& aProperty,const TDesC& aValue) = 0;
	virtual void SetPropertyL(const TDesC8& aProperty,const TDesC8& aValue) = 0;
	virtual void GetTagName(TDes8& aDes) = 0;
	virtual UIStyle& GetUIStyle() = 0;
	
	//�ӿ�
	virtual TBool IsContainer() = 0;
	virtual void* GetInterface(const TDesC& aDes) = 0;
	
	//设置外边框的左上角点坐标
	virtual void SetLT(TInt aLeft,TInt aTop) = 0;
	//设置内容的左上角坐标
	virtual void SetContentLT(TInt aLeft,TInt aTop) = 0;
	//设置边框的左上角坐标
	virtual void SetBorderLT(TInt aLeft,TInt aTop) = 0;
	//设置内边框左上角坐标
	virtual void SetInnerLT(TInt aLeft,TInt aTop) = 0;
	//设置padding矩形的左上角坐标
	virtual void SetPaddingLT(TInt aLeft,TInt aTop) = 0;
	
	virtual TInt GetWidth() const = 0;
	virtual TInt GetHeight() const = 0;
	virtual TRect GetRect() const= 0;
	virtual TRect GetContentRect() const= 0;
	virtual TRect GetBorderRect() const = 0;
	virtual TRect GetInnerRect() const = 0;
	virtual TRect GetPaddingRect() const = 0;
	};

#endif
